.desc-cert {
    font-size: 22px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 330px);
    grid-auto-rows: 250px;
    margin-top: 40px;
    gap: 10px;
    row-gap: 10px;
    padding: 4px;
    margin: 100px auto 2px;
    width: fit-content;
}

.element img {
    width: 100%;
    height: 100%;
    display: block;
}

.element {
    position: relative;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.element a img {
    transition: border-radius 0.25s ease-out;
}

.element:hover a img {
    border-radius: 10px;
}

.element.visible {
    opacity: 1;
    transform: translateY(0);
}

.element:hover {
    cursor: pointer;
}

/* Hovering over images styling for certifications */

.element::after {
    display: flex;
    position: relative;
    content: "View";
    font-size: 3em;
    text-align: center;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    opacity: 0;
    background-color: rgba(0, 0, 0, 0);
    color: white;
    font-weight: bold;
    pointer-events: none;

    transition: background-color 0.25s ease-out, opacity 0.25s ease-out;
}

.element:hover::after {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.5);
}

@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* media queries! how fun */

@media screen and (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 330px);
    }

    .element img {
        width: 98%;
        height: 98%;
        display: block;
    }

    .desc-cert {
        font-size: 16px;
    }

}

@media screen and (max-width: 600px) {

    .grid {
        grid-template-columns: repeat(1, 330px);
    }

    .element img {
        width: 98%;
        height: 98%;
        display: block;
    }

    .desc-cert {
        font-size: 16px;
    }

}